<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title th:text="${titleName}"></title>
    <link rel="stylesheet" href="/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="/adminlte/css/adminlte.min.css">
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    <link rel="stylesheet" href="/toastr/toastr.min.css">
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.css"  crossorigin="anonymous">
    <link href="/fileinput/css/fileinput.css" media="all" rel="stylesheet" type="text/css"/>
    <link href="/fileinput/themes/explorer-fas/theme.css" media="all" rel="stylesheet" type="text/css"/>

</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <header th:replace="admin/common/header::header">

    </header>
    <aside th:replace="admin/common/left::left">

    </aside>
    <div class="content-wrapper">
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark" th:text="${titleName}"></h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="/index/index">主页</a></li>
                            <li class="breadcrumb-item active" th:text="${titleName}"></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
        <div class="content">
            <div class="card-body">
                <input id="file" name="file" type="file" multiple>
            </div>
        </div>
    </div>

    <aside class="control-sidebar control-sidebar-dark">
        <div class="p-3">
            <h5>通知</h5>
            <p>内容</p>
        </div>
    </aside>

    <footer th:replace="admin/common/footer::footer">
    </footer>
</div>
<script src="/jquery/jquery.min.js"></script>
<script src="/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/adminlte/js/adminlte.min.js"></script>
<script src="/toastr/toastr.min.js"></script>
<script src="/fileinput/js/plugins/piexif.js" type="text/javascript"></script>
<script src="/fileinput/js/plugins/sortable.js" type="text/javascript"></script>
<script src="/fileinput/js/fileinput.js" type="text/javascript"></script>
<script src="/fileinput/js/locales/zh.js" type="text/javascript"></script>
<script src="/fileinput/themes/fas/theme.js" type="text/javascript"></script>
<script src="/fileinput/themes/explorer-fas/theme.js" type="text/javascript"></script>
<script>


    $("#file").fileinput({
        theme: 'fas',
        language: 'zh',
        uploadUrl: '/ocr/updatePic',
        allowedFileExtensions: ['jpg', 'png', 'gif'],
        overwriteInitial: false,
        maxFileSize: 100000
    });
    $("#file").on("fileuploaded", function (event, data, previewId, index) {
        if("200"==data.response.code){
            toastr.success("提交成功");
        }else{
            toastr.error(data.response.message);
        }
    });

</script>
</body>
</html>
